﻿Public Class ViewModel

#Region "Constants"
    Const IndexFollow As String = "INDEX, FOLLOW"
    Const NoIndexNoFollow As String = "NOINDEX, NOFOLLOW"
#End Region

#Region "Properties"
    ''' <summary>
    ''' PageTitle
    ''' </summary>    
    Protected Property PageTitle As String

    ''' <summary>
    ''' Description
    ''' </summary>    
    Protected Property Description As String

    ''' <summary>
    ''' Keywords
    ''' </summary>    
    Protected Property Keywords As String

    ''' <summary>
    ''' Robots
    ''' </summary>    
    Protected Property Robots As String

    ''' <summary>
    ''' Menu
    ''' </summary>    
    Public Property Menu As List(Of GetMenu_Result)
#End Region

#Region "Constructors"
    ''' <summary>
    ''' Default Constructor.
    ''' </summary>    
    Public Sub New()
        Me.PageTitle = String.Empty
        Me.Description = ConfigurationManager.AppSettings("Description")
        Me.Keywords = ConfigurationManager.AppSettings("Keywords")
        Me.Robots = ViewModel.IndexFollow

        Me.GetMenu()
    End Sub
#End Region

#Region "Methods"

    ''' <summary>
    ''' Get danh sách menu.
    ''' </summary>    
    Private Sub GetMenu()
        Using context As New FashionshopContext
            Me.Menu = context.GetMenu().ToList()
        End Using
    End Sub

#End Region

End Class
